# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
# Contributor: speps <speps at aur dot archlinux dot org>

pkgname=libkeybinder3
pkgver=0.3.2
pkgrel=4
pkgdesc="A library for registering global keyboard shortcuts"
arch=('x86_64')
url="https://github.com/engla/keybinder/tree/keybinder-3.0"
license=('MIT')
depends=('gtk3')
makedepends=('gtk-doc' 'gobject-introspection')
optdepends=('lua-lgi: lua bindings')
source=(https://github.com/kupferlauncher/keybinder/releases/download/keybinder-3.0-v$pkgver/keybinder-3.0-$pkgver.tar.gz{,.sig}
        libkeybinder3-gtk-doc.patch::https://github.com/kupferlauncher/keybinder/pull/18.patch)
sha256sums=('e6e3de4e1f3b201814a956ab8f16dfc8a262db1937ff1eee4d855365398c6020'
            'SKIP'
            'cdd7ee76d14e6f699a15fb54a50a3976e4976cf81d2abb7be13647202c560e3a')
validpgpkeys=('2578ABA1F9023159DFF211B7368712C4D7A44445') # Ulrik Sverdrup <ulrik.sverdrup@gmail.com>

prepare() {
  cd keybinder-3.0-$pkgver
  patch -p1 -i ../libkeybinder3-gtk-doc.patch
}

build() {
  cd keybinder-3.0-$pkgver
  ./configure --prefix=/usr --enable-gtk-doc
  make
}

package() {
  cd keybinder-3.0-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
